package cn.zn.job;

import cn.hutool.core.date.DateUtil;
import cn.zn.quartz.dto.JobDto;
import cn.zn.quartz.job.AbstractQuartzJob;
import cn.zn.sync.service.OrgSyncService;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OrgIncrementSyncJob extends AbstractQuartzJob {

    @Autowired
    private OrgSyncService orgSyncService;

    @Override
    protected void doExecute(JobExecutionContext context, JobDto job) throws Exception {
        System.out.println("组织增量同步开始：" + DateUtil.now());
        orgSyncService.orgIncrementSync();
        System.out.println("组织增量同步结束：" + DateUtil.now());
    }
}
